|
|
|
|
|
|
|
Have you ever tried to drag a control over someplace it does not want to go? When this happens, you generally see the icon for the international no symbola circle with a line through it. If you want to use this functionality in your application, you need to add code to change the icon when the control is in a location where it shouldnt be dropped. You do this by adding code to the DragOver() events of the items in which you dont want to allow the drop operation to occur. |
|
|
|
|
| Add a Text Box to the Drag Form 1. Go back to Visual Basic design mode. 2. Add a text box to your form so that it looks like the one shown in Figure 32.3. 3. Set the Name property to txtNoDrop. 4. Set the Text property to Can't Drop On Me. |  | In the next sample, you will not allow the Label control to drop on this text box you just added to this form. |
|
|
|
|
|
|
Examples Filename: Drag2.frm |
|
|
|
|
|
|
|
|
Figure 32.3
Cant drop on me. |
|
|
|
|
|
|
|
|
Before you begin more work on this example, lets save the project youve created so far in a completely new folder. |
|
|
|
|
|